using System;
using System.Collections.Generic;
using System.Data;
using Module.DataAccess;
using Module.EntitiesInfo;

namespace Module.BusinessLogic
{
    public class CMSLiveMatchBL
	{
		
		public static int Insert(CMSLiveMatchInfo cMSLiveMatchInfo)
		{
			try
			{
				return new CMSLiveMatchDB().Insert(cMSLiveMatchInfo);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

        public static void Update(CMSLiveMatchInfo cMSLiveMatchInfo)
		{
			try
			{
				new CMSLiveMatchDB().Update(cMSLiveMatchInfo);
			}
			catch (Exception ex)
			{
				throw;
			}

		}
	
        public static void Delete(int id)
		{
			try
			{
				new CMSLiveMatchDB().Delete(id);
			}
			catch (Exception ex)
			{
				throw;
			}

		}

        public static CMSLiveMatchInfo GetInfo(int type, string para_1, string para_2)
        {
            try
            {
                CMSLiveMatchInfo info;
                info = ObjectHelper.FillObject<CMSLiveMatchInfo>(new CMSLiveMatchDB().Select(type, para_1, para_2));
                if (info != null)
                    return info;
                return null;
            }
            catch (Exception)
            {
                throw;
            }
        }

        public static int GetCount(string keysearch,int id,string  linkLive,int beginRow, int endRow)
        {
            try
            {
                return new CMSLiveMatchDB().GetCount(keysearch,id,linkLive,beginRow, endRow);
            }
            catch (Exception ex)
            {
                throw;
            }

        }

        public static DataTable Search(string keysearch,int id,string linkLive,int beginRow, int endRow, string orderByColumn)
        {
            try
            {
                return new CMSLiveMatchDB().Search(keysearch,id,linkLive,beginRow, endRow, orderByColumn);
            }
            catch (Exception ex)
            {
                throw;
            }

        }

	}
}
